<?php
namespace app\admin\model\sum\agent;

use app\admin\model\sum\Common;
use app\admin\model\sum\user\User;

class Apply extends Common
{

    // 表名
    protected $name = 'sum_agent_apply';

    // 追加属性
    protected $append = [
        'status_text',
    ];

    public function statusList()
    {
        return [
            -1 => '已拒绝',
            0 => '待审核',
            1 => '已处理',
        ];
    }
    public function user()
    {
        return $this->belongsTo(User::class, 'user_id', 'id')->field('id, nickname, avatar');
    }
}
